|
|
|
|
|
|
|
Figure 19.8
Finding the shortest distance
between a point and a plane. |
|
|
|
|
|
|
|
|
First, suppose the two lines are parallel. Then finding the distance between the lines is equivalent to finding the distance between any point on the first line and the second line. See the section Point-to-Line earlier in this chapter to see how to find this distance. |
|
|
|
|
|
|
|
|
Now suppose the lines are not parallel. Then the lines are contained in two parallel planes, and the smallest distance between the lines is the same as the distance between the planes. Take the cross product of the vectors defining the lines to find a vector perpendicular to both lines and thus both planes. Now use the technique described in the previous section to find the distance between any point on one line with the other line's plane. |
|
|
|
|
|
|
|
|
Suppose the lines are defined by the points P1 and P2, and vectors V1 and V2. Let A be the vector from point P1 to point P2. Then using the cross product and the previous section gives: |
|
|
|
 |
|
|
|
|
Distance = (A N)/|N|
= (A (V1 × V2))/|V1 × V2| |
|
|
|
|
|
|
|
|
This process is illustrated in Figure 19.9. |
|
|
|
|
|
|
|
|
Two planes are parallel if they have the same normal vector. Obviously, if the planes are not parallel, the distance between them is zero because they intersect. |
|
|
|
|
|
|
|
|
If two planes are parallel, you can pick any point on one plane and then use the techniques described in the earlier section Point-to-Plane to find the distance between that point and the other plane. |
|
|
|
|
|